﻿using Infragistics.Win.UltraWinTabControl;
using Home.Haushalt.Lib;
using Infragistics.Win.UltraWinGrid;
using System.Windows.Forms;

namespace Home.Haushalt.Gui
{
    /// <summary>
    /// 
    /// </summary>
    public class HTabControl:UltraTabControl
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="enable"></param>
        public void EnableSubTabs(bool enable)
        {
            for (int i = 1; i < this.Tabs.Count; i++)
            {
                this.Tabs[i].Enabled = enable;
            }
        }

        /*/// <summary>
        /// 
        /// </summary>
        /// <param name="elementTypeName"></param>
        /// <param name="property"></param>
        /// <param name="value"></param>
        public void AddTab(string elementTypeName, string property, object value)
        {
            UltraTab tab = this.Tabs.Add("tab" + elementTypeName.ToString(), elementTypeName.ToString());
            tab.Enabled = true;

            HGridElement grid = new HGridElement();
            grid.Dock = DockStyle.Fill;
            tab.TabPage.Controls.Add(grid);

            grid.DataBind(elementTypeName);
            grid.DisplayLayout.Bands[0].ColumnFilters[property].FilterConditions.Add(FilterComparisionOperator.Equals, value);


        }*/

    }
}
